package com.zkingsoft.web.action;

public class CommonsMultiparResolver extends org.springframework.web.multipart.commons.CommonsMultipartResolver {

	/**
	 * 用于过滤百度编辑器上传文件时阻止 commonsMultipartResolver 对文件进行包装
	 */
	@Override
	public boolean isMultipart(javax.servlet.http.HttpServletRequest request) {
		
		String uri = request.getRequestURI();
		System.out.println(uri);
		// 过滤使用百度EmEditor的URI
		if (uri.indexOf("baidu") > -1) {
			System.out.println("commonsMultipartResolver 由百度编辑器处理");
			return true;
		}
		System.out.println("commonsMultipartResolver 自己处理");
		return super.isMultipart(request);
	}
}
